Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> #main { width: 400px; height: 400px; border: 1px solid #c3c3c3; display: -webkit-flex; /* Safari */ -webkit-flex-direction: row-reverse; /* Safari 6.1+ */ display: flex; flex-direction: row-reverse; } #main div { width: 50px; height: 50px; } </style> </head> <body> <div id="main"> <div style="background-color:coral;">A</div> <div style="background-color:lightblue;">B</div> <div style="background-color:khaki;">C</div> <div style="background-color:pink;">D</div> <div style="background-color:lightgrey;">E</div> <div style="background-color:lightgreen;">F</div> </div> <p><b>Note:</b> Internet Explorer 10 and earlier versions do not support the flex-direction property.</p> <p><b>Note:</b> Safari 6.1 (and newer) supports an alternative, the -webkit-flex-direction property.</p> </body> <!-- Mirrored from www.w3schools.com/cssref/tryit.asp?filename=trycss3_flex-direction by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:51:49 GMT --> </html>
Result:
Try it Yourself - © w3schools.com